package cn.airfei.netty.nettyexample.rpc.customer;

import cn.airfei.netty.nettyexample.rpc.common.HelloService;
import cn.airfei.netty.nettyexample.rpc.netty.NettyClient;

/**
 * @description:
 * @author: air
 * @create: 2021-01-22 16:08
 */
public class ClientBootstrap {
    // 定义协议头
    public static final String providerName="HelloService#Hello#";

    public static void main(String[] args) {
        NettyClient customer = new NettyClient();
        HelloService helloService = (HelloService) customer.getBean(HelloService.class, providerName);

        String msg = helloService.hello("ss");

        System.out.println("服务端返回:"+msg);

    }

}
